package com.ykq.system.controller.api;

import com.ykq.system.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: education-parent
 * @description:
 * @author: 闫克起2
 * @create: 2022-08-03 11:31
 **/
@RestController
@RequestMapping("/api/system/permission")
public class ApiPermissionController {
    @Autowired
    private PermissionService permissionService;
    //根据用户id查询对于的权限路径
    @GetMapping("findByUserId/{id}")
    public List<String> findByUserId(@PathVariable String id){
        return permissionService.selectByUserId(id);
    }
}
